from pms.common.views import PostFormula
from project.models import Project
from technology.models import Technology
from project.utils.profile import technology_view


class API(PostFormula):

    def handle(self, req):
        tid = req['tid']
        pid = req['pid']
        technology = Technology.objects.get(id=tid)
        project = Project.objects.get(id=pid)
        return self.success_respond(technology_view(project, technology))
